﻿using Scpi.GWInstek.Controler;
using System;
using System.Threading.Tasks;

namespace testTcpConnect
{
    class Program
    {
        static async Task Main(string[] args)
        {
            var ctr = ControlerBuilder.BuildGwPWSCtr("ctr1", "127.0.0.1");
            try
            {
                await ctr.TryConnectRemote();
                Console.WriteLine("Connect successful!!");

                var result=await ctr.EnablePowerOutAsync();

                Console.WriteLine($"Enable power {result}");
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            

            Console.ReadKey();

            ctr.Dispose();
        }
    }
}
